package com.tczs.dispatch.response;

import com.alibaba.fastjson.JSONObject;

/**
 * 应用后端返回的数据
 * filePath 不为空代表返回 文件类型
 * value  不为空代表返回  JSONObject字符串数据
 */
public class ResponseResult {

    private int code;
    private ResponseType type;
    private String filePath;
    private JSONObject value;
    private String errorMessage;

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public ResponseType getType() {
        return type;
    }

    public void setType(ResponseType type) {
        this.type = type;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public JSONObject getValue() {
        return value;
    }

    public void setValue(JSONObject value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "ResponseResult{" +
                "code=" + code +
                ", type=" + type +
                ", filePath='" + filePath + '\'' +
                ", value=" + value +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
